import java.math.BigDecimal;
public class Test04 {
    public static void main(String[] args) {


     double money = 2.0;
     double price = 1.1;
     double change= money-price;
     System.out.println("找零: " + change);
        //引入新类解决精度问题
     BigDecimal money1 = new BigDecimal("2.0");
     BigDecimal price1 = new BigDecimal("1.1");
     double change1 = money1.subtract(price1).doubleValue();
     System.out.println("找零: " + change1);

    }
}
